<?php

class LoginController extends Controller {
	
	public function index($path) {
		if($path) {
			throw new NotFoundException();
		}
	}
	
	public function submit() {
		if(!$_POST['uname'] || !$_POST['pwd']) {
			G('');
		}
		Model::load('LoginModel');
		LoginModel::login($_POST['uname'], $_POST['pwd']);
		G('');
	}
}